import java.util.Scanner;
public class operation {
    public static void main(String[] args) {
        int i = 0;
        int count = 0;
        int j = 0;
        for (i = 1; i <= 100; i++) {
            j = i;
            while (j!=0) {
                int num = 0;
                num = j% 10;
                if (num == 9) {
                    count++;
                }
                j= j/ 10;
            }
        }
        System.out.println(count);
    }
    public static void main3(String[] args) {
        int i=0;
        for(i=1000;i<=2000;i++){
            if(i%100!=0){
                if(i%4==0){
                    System.out.println(i+"该年是闰年");
                }
            }else{
                if(i%400==0){
                    System.out.println(i+"该年是闰年");
                }
            }
        }
    }
    public static void main2(String[] args) {
        int i = 2;
        int j=0;
        for (i = 1; i <= 100; i++) {
            for(j=2;j<i;j++)
            {
                if(i % j==0) {
                    break;
                }
            }
            if(j==i) {
                System.out.println(i + "该数是素数");
            }
        }
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int i = 2;
        for (i = 2; i < num; i++) {
            if (num % i == 0) {
                System.out.println("该数不是素数");
                break;
            }
        }
        if (i == num) {
            System.out.println("该数是素数");
        }
    }
}


